package controller;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class LogoutLogic implements BusinessLogic{

	public void execute(HttpServletRequest req, HttpServletResponse res)
			throws Exception {
		
		System.out.println("LogarLogic: Executando... ");
		
		String fwd = req.getParameter("sucesso");

		HttpSession session = req.getSession();
		session.removeAttribute("associado");
	
		RequestDispatcher rd = req.getRequestDispatcher("/"+fwd);
		rd.forward(req, res);
		System.out.print(" ...OK");		
	}
}
